From f88b5818802a896a3bcfb6ef7967dabdaa82f5cf Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 14 May 2016 23:31:11 +0300 Subject: [PATCH] report status to stderr instead of stdout --- src/cargo/core/shell.rs | 2 +- tests/test_bad_config.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index b2241ada0..ca3ff690c 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -73,7 +73,7 @@ impl MultiShell { { match self.verbosity { Quiet => Ok(()), - _ => self.out().say_status(status, message, GREEN, true) + _ => self.err().say_status(status, message, GREEN, true) } } diff --git a/tests/test_bad_config.rs b/tests/test_bad_config.rs index de882cdc4..93eaee213 100644 --- a/tests/test_bad_config.rs +++ b/tests/test_bad_config.rs @@ -71,6 +71,7 @@ test!(bad3 { "#); assert_that(foo.cargo_process("publish").arg("-v"), execs().with_status(101).with_stderr("\ +[UPDATING] registry `https://[..]` [ERROR] invalid configuration for key `http.proxy` expected a string, but found a boolean in [..]config ")); @@ -232,6 +233,7 @@ test!(bad_git_dependency { assert_that(foo.cargo_process("build").arg("-v"), execs().with_status(101).with_stderr("\ +[UPDATING] git repository `file:///` [ERROR] Unable to update file:/// Caused by: @@ -258,6 +260,8 @@ test!(bad_crate_type { assert_that(foo.cargo_process("build").arg("-v"), execs().with_status(0).with_stderr("\ warning: crate-type \"bad_type\" was not one of lib|rlib|dylib|staticlib +[COMPILING] foo v0.0.0 (file:///[..]) +[RUNNING] `rustc [..] --crate-type rlib [..]` ")); }); @@ -430,6 +434,7 @@ test!(unused_keys { assert_that(foo.cargo_process("build"), execs().with_status(0).with_stderr("\ warning: unused manifest key: target.foo.bar +[COMPILING] foo v0.1.0 (file:///[..]) ")); }); -- 2.30.2